package com.atguigu.gulimall.gateway.controller;


import com.atguigu.common.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Value("${gateway.hello.name}")
    String name;

    @RequestMapping("/test01")
    public R test01(){
        return  R.ok().put("name",this.name);
    }
}
